<template>
  <div v-if="value">
    <header @click="close">syntacticSugar弹层===>点击可以关闭</header>
    <slot></slot>
  </div>
</template>

<script>
export default {
  emits: ['input'],
  props: {
    value: {
      type: Boolean,
      default: false
    }
  },
  methods: {
    close () {
      // 发送语法糖input事件
      this.$emit('input', false)
    }
  }
}
</script>

<style lang="scss" scoped>
</style>
